From 6e06a601eb80de9c1d7fa1ea5fbdd4e73bd41843 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 27 Jul 2009 10:02:38 +0000 Subject: [PATCH] * net/dbus.el (dbus-call-method-non-blocking): Handle the case the function returns nil. (dbus-handle-event): Handle special return value :ignore. Reported by Jan Moringen . --- lisp/net/dbus.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el index f586a4125de..894d7c63787 100644 --- a/lisp/net/dbus.el +++ b/lisp/net/dbus.el @@ -184,7 +184,7 @@ usage: (dbus-call-method-non-blocking 'dbus-call-method-non-blocking-handler args))) ;; Wait until `dbus-call-method-non-blocking-handler' has put the ;; result into `dbus-return-values-table'. - (while (not (gethash key dbus-return-values-table nil)) + (while (eq (gethash key dbus-return-values-table :ignore) :ignore) (read-event nil nil 0.1)) ;; Cleanup `dbus-return-values-table'. Return the result. @@ -368,9 +368,12 @@ If the HANDLER returns an `dbus-error', it is propagated as return message." ;; Return a message when it is a message call. (when (= dbus-message-type-method-call (nth 2 event)) (dbus-ignore-errors - (apply 'dbus-method-return-internal - (nth 1 event) (nth 3 event) (nth 4 event) - (if (consp result) result (list result)))))) + (if (eq result :ignore) + (dbus-method-return-internal + (nth 1 event) (nth 3 event) (nth 4 event)) + (apply 'dbus-method-return-internal + (nth 1 event) (nth 3 event) (nth 4 event) + (if (consp result) result (list result))))))) ;; Error handling. (dbus-error ;; Return an error message when it is a message call. -- 2.30.2